import base

class form(base.tag):
    def addEvent(self, event, action):
        self.addTagOpt(event, action)

class input(form):
    def __init__(self, val=None):
        form.__init__(self, [])
        if val:
            self.addTagOpt("value", val)
    def setType(self, t):
        self.addTagOpt("type", t)


class button(form):
    pass


class option(base.tag):
    def __init__(self, txt):
        base.tag.__init__(self, [base.string(txt)])

class select(form):
    def addOption(self, opt):
        self.addChild(opt)

class textarea(form):
    pass
